package cn.ynrcb.personnelfile.sysadmin.controller;

import cn.ynrcb.personnelfile.common.utils.R;
import cn.ynrcb.personnelfile.sysadmin.dao.SysRegionDao;
import cn.ynrcb.personnelfile.sysadmin.service.SysRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("sys/region")
public class SysRegionController extends AbstractController {
    @Autowired
    SysRegionService sysRegionService;
    @Autowired
    SysRegionDao sysRegionDao;

    /**
     * 所属街道列表
     */
    @GetMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        List<Map<String, String>> regionList = sysRegionDao.getRegionList(params);

        return R.ok().put("regionList", regionList);
    }

}
